package com.example.alibabanacosdiscoveryserver.config;

import com.github.xiaoymin.knife4j.spring.annotations.EnableKnife4j;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Contact;
import io.swagger.v3.oas.models.info.Info;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@EnableKnife4j
public class SwaggerConfig {
    @Bean
    public OpenAPI publicApi() {
        return new OpenAPI()
                .info(apiInfo());
    }
    private Info apiInfo() {
        return new Info()
                .title("My RESTFul APIs")
                .description("api服务提供端接口")
                .termsOfService("http://localhost:8001/")
                .contact(new Contact().name("guoq").email("xxx@guoq.com").url("http://guoq.com.cn"))
                .version("1.0");

    }

}
